 import {axios}  from '../utils/requset.js'
 
 export function login(parameter){
	return axios({
		url:'sys/login_cas/'+parameter.userNo,
		method:'get',
		params:{}
	})
 }
 
  export function queryNewsLast(parameter){
      return axios({
       url:'/approveprocess/indexUnApproveProcess_app',
       method:'get',
       params:parameter,
       headers:{
         'Content-Type': 'application/json;charset=UTF-8',
         // 'X-Access-Token':null
       }
      })
 }
  
  export function getOrgNameById(id) {
    return axios({
      url:'/sysdepart/sysDepart/getDeptInfoById',
      method: 'post',
      id: id,
    })
  }
 
 export function  queryNewsById(parameter) {
   return axios({
     url:'/contract/queryById',
     method: 'get',
     params: parameter,
   })
 }
 
 //登录部门请求接口
 export function loginDepart(parameter){
	 return axios({
		url:'sys/selectDepart',
		method: 'post',
		data: parameter 
	 })
 }
 // 移动端的统计数据和
 export function querySysData(){
	 return axios({
		 url:'/approveprocess/getStatisticsUnApproval',
		 method:'get',
		 params:{}
	 })
 }
 
 export function queryTotal(parameter){
	 return axios({
		 url:'approveprocess/m/getApproveCountByStatus/'+parameter.status+'/'+parameter.type,
		 method:'get',
		  params:{}
	 })
 }
 
 export function queryAppProInfo(url,parameter){
	 return axios({
		 url:url,
		 method:'get',
		 params:parameter
	 })
 }
 //  查询第一步基础信息
 export function getBase1Info(parameter) {
     return axios({
         url: 'cg/cg1/getbase/' + parameter.id,
         method: 'post',
         params: {}
     })
 }
 export function getSimpleChilren(parameter) {
     return axios({
         url: 'demo/subproject/queryByProjectWithSubProj',
         method: 'get',
         params: parameter
     })
 }

export function getBase2Info(parameter) {
    return axios({
        url: 'cg/cg2/getbase/' + parameter.id,
        method: 'post',
        params: {}
    })
}

export function queryDictList(parameter) {
    return axios({
        url: 'sys/dict/getDictItems/' + parameter.id,
        method: 'get',
        params: {}
    })
}
export function queryDictValue(parameter) {
    return axios({
        url: 'sys/dict/getDictText/' + parameter.id + '/' + parameter.type,
        method: 'get',
        params: {}
    });
}

// 产品清单列表
export function getProductList(parameter) {
    return axios({
        url: 'demo/productInventory/list',
        method: 'get',
        params: parameter
    })
}

//查询出资财务列表
export function getFinanceList(parameter) {
    return axios({
        url: 'cg/cg2/cgFinproj/list/' + parameter.cgId,
        method: 'get',
        params: {}
    })
}
// 查询第三部 采购信息
export function getBase3Info(parameter) {
    return axios({
        url: 'cg/cg3/getbase/' + parameter.id,
        method: 'get',
        params: {}
    })
}

//查询出采购的调研情况列表
export function getInvestList(parameter) {
    return axios({
        url: 'cg/cg3/getInvestigation/' + parameter.cgId,
        method: 'get',
        params: {}
    })
}
// 获取文件列表
export function getFileList(parameter){
	return axios({
		url:'sys/file/filelist/all/'+ parameter.cgId,
		method:'get',
		params:{}
	})
}

// // 查询审批记录
export function getRemarkInfo(parameter){
  return axios({
      url:'process/qryApproveComment/'+parameter.id,
      method:'get',
      params:{}
  })
}


// 采购审批接口 同意或者拒绝
export function submitDoApprove(parameter) {
    return axios({
        url: "process/doApprove",
        method: 'post',
        data: parameter
    })
}

// 获取招标任务信息
export function getZBBaseInfor(parameter){
  return axios({
    url:'agenciesTask/getZbTaskBase/'+parameter.id,
    method:'get',
    params:{}
  })
}
// 获取供应商列表
export function getSupplierList(parameter){
  return axios({
   url: "supplierSignup/list",
   method: 'get',
   params: parameter
  })
}

// 获取招标文件列表
export function getZBFileList(parameter){
  return axios({
    url:'agenciesTask/getZbTaskFileList/'+parameter.id,
    method:'get',
    params:{}
  })
}

// 招标任务的审批
export function submitZPFormData(parameter){
  return axios({
      url:'process/doApprove',
      method:'post',
      data:parameter
  })
}
//根据合同ID查询出合同相关的信息
export function getContractDetail(parameter){
    return axios({
        url:'contract/queryById',
        method:'get',
        params:parameter,
        // responseType: 'blob'
    })
    }

//查询合同付款清单
export function getHtCtrPaymentplan(parameter) {
    return axios({
        url: 'system/projectFinance/getContractFinanceByContractId',
        method: 'get',
        params: parameter,
    })
}	

//合同审批同意和拒绝
export function htSaveAndSubmit(parameter) {
    return axios({
        url: 'contract/htSaveAndSubmit',
        method:'post',
        data: parameter
    })
}
// 合同和验证查询
export function getUserHTList(parameter,url){
	return axios({
		url: 'contract/myContractsApp',
		method: 'get',
		params: parameter
	})
}
// 合同验证
	export function approveAcceptanceContract(parameter) {
	    return axios({
	        url: 'tHtContract/approveAcceptance',
	        method:'post',
	        params:parameter
	    })
	}

export function getMyEntityInfo(){
	return axios({
		url:"mobileopen/getMyEntityInfo",
		method:'get',
		params:{}
	})
}
// 南航采购确认接口
export function submitOtherRenson(parameter) {

    return axios({
        url: 'cg/cgSaveAndSubmit',
        method: 'post',
        data: parameter
    })
}

// 南航采购确认接口
export function mbLogin(parameter) {

    return axios({
        url: 'mobile/mobileLogin?token=' + parameter.token,
        method: 'get',
       params: {}
    })
}